﻿import request from '/@/utils/request';
enum Api {
  AddDevicePointsValue = '/api/devicePointsValue/add',
  DeleteDevicePointsValue = '/api/devicePointsValue/delete',
  UpdateDevicePointsValue = '/api/devicePointsValue/update',
  PageDevicePointsValue = '/api/devicePointsValue/page',
  DetailDevicePointsValue = '/api/devicePointsValue/detail',
  GetDeviceInfoDeviceInfoIdDropdown = '/api/devicePointsValue/DeviceInfoDeviceInfoIdDropdown',
  GetDeviceSlaveTemplatePointsDeviceSlaveTemplatePointsIdDropdown = '/api/devicePointsValue/DeviceSlaveTemplatePointsDeviceSlaveTemplatePointsIdDropdown',
}

// 增加设备变量值
export const addDevicePointsValue = (params?: any) =>
	request({
		url: Api.AddDevicePointsValue,
		method: 'post',
		data: params,
	});

// 删除设备变量值
export const deleteDevicePointsValue = (params?: any) => 
	request({
			url: Api.DeleteDevicePointsValue,
			method: 'post',
			data: params,
		});

// 编辑设备变量值
export const updateDevicePointsValue = (params?: any) => 
	request({
			url: Api.UpdateDevicePointsValue,
			method: 'post',
			data: params,
		});

// 分页查询设备变量值
export const pageDevicePointsValue = (params?: any) => 
	request({
			url: Api.PageDevicePointsValue,
			method: 'post',
			data: params,
		});

// 详情设备变量值
export const detailDevicePointsValue = (id: any) => 
	request({
			url: Api.DetailDevicePointsValue,
			method: 'get',
			data: { id },
		});

export const getDeviceInfoDeviceInfoIdDropdown = () =>
		request({
		url: Api.GetDeviceInfoDeviceInfoIdDropdown,
		method: 'get'
		});
export const getDeviceSlaveTemplatePointsDeviceSlaveTemplatePointsIdDropdown = () =>
		request({
		url: Api.GetDeviceSlaveTemplatePointsDeviceSlaveTemplatePointsIdDropdown,
		method: 'get'
		});

